﻿module Sustainalytics.Common {

    var mod = angular.module(commonModuleName);

    mod.directive('snServerError', function () {
        return {
            restrict: "A", //attribute
            require: 'ngModel',
            link: function (scope, element, attrs: any, ctrl) {
                scope.$watch(attrs.ngModel, () => {
                    ctrl.$setValidity('server', true)
                });
            }
        };
    });
}